import Vue from 'vue'
import VueRouter from 'vue-router'
import login from '../views/login/login'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'login',
    component: login
  },
  {
    path: '/insuranceSystem',
    name: 'insuranceSystem',
    component: () => import(/* webpackChunkName: "about" */ '../views/insuranceSystem/insuranceSystem.vue'),
    children: [
      //管理员列表
      {
        path: 'Administrator',
        name: 'Administrator',
        component: () => import('../components/childComponents/Administrator.vue'),
      },
      //新增管理员
      {
        path: 'AddAdministrator',
        name: 'AddAdministrator',
        component: () => import('../components/childComponents/Addadministrator.vue')
      },
      //销售员
      {
        path: 'AddSalesman',
        name: 'AddSalesman',
        component: () => import('../components/childComponents/AddSalesman.vue')
      },
      //销售人员列表
      {
        path: 'SalesmanList',
        name: 'SalesmanList',
        component: () => import('../components/childComponents/SalesmanList.vue')
      },


      //客户管理
      {
        path: 'CustomerManagement',
        name: 'CustomerManagement',
        component: () => import('../components/childComponents/CustomerManagement.vue'), 
      },
      //查看所有客户信息
      {
        path: 'getUsers',
        name: 'getUsers',
        component: () => import('../components/childComponents/getUsers.vue'), 
      },
      //查看所属销售员
      {
        path: 'getUsersSubsidiary',
        name: 'getUsersSubsidiary',
        component: () => import('../components/childComponents/getUsersSubsidiary.vue'), 
      },
      //保险产品分类列表
      {
        path: 'TypesList',
        name: 'TypesList',
        component: () => import('../components/childComponents/TypesList.vue')
      },

      //新增保险分类
      {
        path: 'AddTypes',
        name: 'AddTypes',
        component: () => import('../components/childComponents/AddTypes.vue')
      },

      //保险产品列表
      {
        path: 'InsuranceProductsList',
        name: 'InsuranceProductsList',
        component: () => import('../components/childComponents/InsuranceProductsList.vue')
      },
      //新增保险
      {
        path: 'AddInsuranceProducts',
        name: 'AddInsuranceProducts',
        component: () => import('../components/childComponents/AddInsuranceProducts.vue')
      },
      //管理员全部订单 AllOrdersAdm
      {
        path: 'AllOrdersAdm',
        name: 'AllOrdersAdm',
        component: () => import('../components/childComponents/AllOrdersAdm.vue')
      },
      //销售员全部订单
      {
        path: 'AllOrders',
        name: 'AllOrders',
        component: () => import('../components/childComponents/AllOrders.vue')
      },
      //修改订单
      {
        path: 'salesUpdateOrder',
        name: 'salesUpdateOrder',
        component: () => import('../components/childComponents/salesUpdateOrder.vue')
      },
      //查看订单详情
      {
        path: 'salesShowOrder',
        name: 'salesShowOrder',
        component: () => import('../components/childComponents/salesShowOrder.vue')
      },

      //已支付订单
      {
        path: 'PaidOrder',
        name: 'PaidOrder',
        component: () => import('../components/childComponents/PaidOrder.vue')
      },
      //未支付订单
      {
        path: 'UnpaidOrder',
        name: 'UnpaidOrder',
        component: () => import('../components/childComponents/UnpaidOrder.vue')
      },
      //已完成理赔
      {
        path: 'AccomplishClaim',
        name: 'AccomplishClaim',
        component: () => import('../components/childComponents/AccomplishClaim.vue')
      },
      //未完成理赔
      {
        path: 'AccomplishUnfinished',
        name: 'AccomplishUnfinished',
        component: () => import('../components/childComponents/AccomplishUnfinished.vue')
      },
      //销售员理赔
      {
        path: 'claims',
        component: () => import('../components/childComponents/Claims.vue')
      },
      {
        path: 'increaseClaims',
        component: () => import('../components/childComponents/IncreaseClaims.vue')
      },
      //我的邀请
      {
        path: 'MyInvitation',
        name: 'MyInvitation',
        component: () => import('../components/childComponents/MyInvitation.vue')
      },
      //个人中心
      {
        path: 'PersonalCenter',
        name: 'PersonalCenter',
        component: () => import('../components/childComponents/PersonalCenter.vue')
      },
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
